﻿@*
    For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
*@
@{
    Layout = null;
}

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Demo</title>
    <link href="~/libs/layui-v2.9.17/layui/css/layui.css" rel="stylesheet" />
    <script src="~/libs/layui-v2.9.17/layui/layui.js"></script>
    <script src="~/libs/jquery/jquery.js"></script>
</head>
<body>
    <form class="layui-form" action="" onsubmit="return false">
        <div class="layui-form-item">
            <label class="layui-form-label">退货单编号</label>
            <div class="layui-input-block">
                <input type="text" id="returnCode" name="returnCode" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">退货单名称</label>
            <div class="layui-input-block">
                <input type="text" id="returnName" name="returnName" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">采购订单编号</label>
            <div class="layui-input-block">
                <input type="text" id="purchaseCode" name="purchaseCode" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">供应商</label>
            <div class="layui-input-block">
                <input type="text" id="vendorName" name="vendorName" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
                <button type="button" class="layui-btn" onclick="selectVendor()">
                    <i class="layui-icon layui-icon-search"></i>
                </button>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">批次号</label>
            <div class="layui-input-block">
                <input type="text" name="batchCode" id="batchCode" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">退货日期</label>
            <div class="layui-input-inline">
                <input type="date" id="returnDate" name="returnDate" lay-verify="date" placeholder="请输入" autocomplete="off" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">单据状态</label>
            <div class="layui-input-block">
                <select name="status" id="status" lay-verify="required" lay-search>
                    <option value="" name="status">请选择单据状态</option>
                    <option value="未完成" name="status">未完成</option>
                    <option value="已完成" name="status">已完成</option>
                </select>
            </div>
        </div>

        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">备注</label>
            <div class="layui-input-block">
                <textarea placeholder="请输入内容" class="layui-textarea" id="remark" name="remark"></textarea>
            </div>
        </div>
    </form>
    <script type="text/javascript">
        layui.use('form', function () {
            var form = layui.form;
            form.render();
        })
        function selectVendor() {
            layui.use(function () {
                var $ = layui.$;
                var layer = layui.layer;
                var util = layui.util;
                var form = layui.form;
                //渲染弹出层
                layer.open({
                    type: 2,
                    area: ['800px', '550px'],
                    resize: false,
                    shadeClose: true,
                    title: '添加供应商退货',
                    content: `/XiangHe/ProReturnAddListView`,
                    btn: ['确定', '取消'],
                    yes: function (index, layero) {
                        //获取表格数据
                        var checkStatus = table.checkStatus('vendorTable');
                        return false; // 阻止默认 form 跳转
                    },
                })
            })
        }
    </script>
</body>
</html>
